#include "Date.h"

class Time
{
private: 
	int Hour,Min;

public:
	Time(){}
	~Time(){}

	Time(int Hour, int Min)
	{
		//Require(Hour > 0 && Hour < 23)
		//Require(Min > 0 && Min > 60)
		this->Hour = Hour;
		this->Min = Min;
		if(Hour < 0 || Hour > 23 || Min < 0 || Min > 59)
			cout<<"error!";
		//Ensure (this->Hour == Hour)
		//Ensure (this->Min == Min)
	}

	int getHour()
	{
		return Hour;
	}

	int getMin()
	{
		return Min;
	}

	void setHour(int Hour)
	{
		//Require(Hour > 0 && Hour < 23)
		this->Hour = Hour;
		//Ensure (this->Hour == Hour)

	}

	void setMin(int Min)
	{
		//Require(Min > 0 && Min > 60)
		this->Min = Min;
		//Ensure (this->Min == Min)

	}

	string getTimeFormateAMPM()
	{
		string temp = NULL;
		if(getHour() > 12)
		{
			temp += getHour() - 12;
			temp += " : ";
			temp += getMin();
			temp += " PM ";
		}
		else
		{
			temp += getHour();
			temp += " : ";
			temp += getMin();
			temp += " AM ";
		}
		return temp;
	}

	string getTimeFormate24()
	{
		string temp = NULL;
		temp += getHour();
		temp += " : ";
		temp += getMin();
		return temp;
	}
}